﻿using nplJobsCommon.Employeer;
using nplJobsDAL.Insert;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace nplJobsBLL.ProcessEmployeer
{
    public class ProcessInserEmployeer
    {
        public string checkUnique;
        public Int64 lastEmployeerID = -1;

        public ProcessInserEmployeer()
        {
        }
        public Employeer Employeer { get; set; }
      
        public void invoke()
        {
            InsertEmployeer insertEmployeer = new InsertEmployeer();
            insertEmployeer.Employeer = this.Employeer;
            insertEmployeer.Insert();
            lastEmployeerID = insertEmployeer.lastEmployeerID;
            this.checkUnique = insertEmployeer.checkUnique;
        }

        public void Update()
        {
            nplJobsDAL.Update.UpdateEmployeer insertEmployeer = new nplJobsDAL.Update.UpdateEmployeer();
            insertEmployeer.Employeer = this.Employeer;
            insertEmployeer.invoke();
        }
    }
}
